Extract rule: template-splat-attributes-only#2621
Conversation
NullVoxPopuli-ai-agent
left a comment
There was a problem hiding this comment.
Review: template-splat-attributes-only
Compared against ember-template-lint splat-attributes-only.js.
General Correctness
-
Faithful port: This is a clean, minimal rule and the ESLint port matches the original perfectly. The original checks
AttrNodewherenode.name.startsWith('...')andnode.name !== '...attributes', and the port does exactly the same withGlimmerAttrNode. The error message matches. Well done. -
Error message: Matches the original exactly:
'Only \...attributes` can be applied to elements'`. Good. -
Tests: Cover the main cases. The hbs tests include
...argumentsas invalid. The gjs tests additionally test...props. Good coverage. -
No issues found: This is a straightforward structural check with no edge cases to worry about.
Scope Analysis (gjs/gts)
This rule only checks attribute names (structural/syntactic property). It does not match any helper or component names. No scope analysis needed.
🤖 Automated review comparing with ember-template-lint source
bd35d5f to
776ee42
Compare
Split from #2371.